<?php include _include(APP_PATH.'view/htm/header.inc.htm');?>

<!--{hook user_profile_start.htm}-->

<div class="row">
	<div class="col-lg-8 offset-lg-2">
		<div class="card">
			<div class="card-body text-center">
				<img class="avatar-lg" src="<?php echo $_user['avatar_url'];?>">
				<h4 class="text-center"><?php echo $_user['username'];?></h4>
				<p class="text-center">[<?php echo $_user['groupname'];?>]</p>
				<hr />
				<div class="row">
					<div class="col-sm-6">
						<p><span class="text-muted"><?php echo lang('username');?>：</span><span><?php echo $_user['username'];?></span></p>
						<p><span class="text-muted"><?php echo lang('email');?>：</span><span><?php echo $_user['email'];?></span></p>
						<p><span class="text-muted"><?php echo lang('user_group');?>：</span><span><?php echo $_user['groupname'];?></span></p>
						<p><span class="text-muted"><?php echo lang('create_date');?>：</span><span><?php echo $_user['create_date_fmt'];?></span></p>
						<p><span class="text-muted"><?php echo lang('last_login_date');?>：</span><span><?php echo $_user['login_date_fmt'];?></span></p>
						<!--{hook user_profile_login_date_after.htm}-->
					</div>
					<div class="col-sm-6">
						<p><span class="text-muted"><?php echo lang('threads');?>：</span><span><?php echo $_user['threads'];?></span></p>
						<p><span class="text-muted"><?php echo lang('posts');?>：</span><span><?php echo $_user['posts'];?></span></p>
						<!--{hook user_profile_posts_after.htm}-->
					</div>
				</div>
				<!--{hook user_profile_my_thread_before.htm}-->
			</div>
		</div>
		
		<div class="card">
			<div class="card-header">
				<ul class="nav nav-tabs card-header-tabs">
					<li class="nav-item">
						<a class="nav-link <?php echo $active == 'default' ? 'active' : '';?>" href="<?php echo url("user-$_uid");?>"><?php echo lang('user_joined_thread');?> (<?php echo $_user['threads'];?>)</a>
					</li>
					<!--{hook user_profile_nav_item_after.htm}-->
				</ul>
			</div>
			<div class="card-body">
				<table class="table table-hover threadlist">
					<tbody>
						<?php include _include(APP_PATH.'view/htm/thread_list.inc.htm');?>
					</tbody>
				</table>
			</div>
		</div>
		
		<nav class="text-center"><ul class="pagination"><?php echo $pagination; ?></ul></nav>
		　　
		<!--{hook user_profile_page_after.htm}-->

		<?php if(!empty($group['allowdeleteuser'])) { ?>
		<a role="button" class="btn btn-danger confirm btn-block" data-confirm-text="<?php echo lang('confirm_delete_user');?>" data-method="post" href="<?php echo url("mod-deleteuser-$_user[uid]");?>"><?php echo lang('delete_user');?></a>
		<?php } ?>
		
		<a role="button" class="btn btn-secondary btn-block mt-3" href="<?php echo url('my');?>"> <?php echo lang('back');?> </a>
		
		
	</div>
</div>

<!--{hook user_profile_end.htm}-->

<?php include _include(APP_PATH.'view/htm/footer.inc.htm');?>

<!--{hook user_profile_js.htm}-->